home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 233 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Why does a compiled program fail on another machine?
  5. Date: Wed, 03 Jan 96 14:32:21 GMT
  6. Organization: none
  7. Message-ID: <820679541snz@genesis.demon.co.uk>
  8. References: <820634806snz@metsys.demon.co.uk> <30ea6d57.45218688@nntp.ix.netcom.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <30ea6d57.45218688@nntp.ix.netcom.com>
  15.            miker3@ix.netcom.com "Mike Rubenstein" writes:
  16.  
  17. >Most likely this is caused by an uninitialized variable that happens
  18. >to take on a legal argument value for acos() on one machine but not
  19. >the other.
  20.  
  21. It could also be due to a slight difference in the way floating point
  22. is handled on the 2 systems (which is possible). For instance one system
  23. might evaluate something to 1.0000000000000000 while the other
  24. evaluates it to 1.0000000000000001. The first is valid while the second is
  25. a domain error.
  26.  
  27. Either way though the problem is in the program itself. Log (or debug)
  28. the value being passed to acos() and the problem will most likely become
  29. clear.
  30.  
  31. -- 
  32. -----------------------------------------
  33. Lawrence Kirby | fred@genesis.demon.co.uk
  34. Wilts, England | 70734.126@compuserve.com
  35. -----------------------------------------
  36.